import Vue from 'vue';
import Router from 'vue-router';

import Home from '@/components/common/Home.vue';
import Login from '@/components/common/Login.vue';
import debug403 from '@/components/common/403.vue';
import debug404 from '@/components/common/404.vue';

//系统管理
import menu from '@/components/page/systemManage/menu/index.vue';
import user from '@/components/page/systemManage/user/index.vue';
import roles from '@/components/page/systemManage/roles/index.vue';
import company from '@/components/page/systemManage/company/index.vue';

/*
* 医院管理
* */
import HospitalBasic from '@/components/page/Hospital/BasicInfo.vue';

/*
* 经销商管理
* */
import DistributorBasic from '@/components/page/Distributor/BasicInfo.vue';


/*
* 报单管理
* */
import applyList from '@/components/page/Manufacturer/applyList.vue'
import ToExamine from '@/components/page/Manufacturer/ToExamine.vue';
import applyProcess from '@/components/page/Manufacturer/applyProcess.vue'
import Intention from '@/components/page/Manufacturer/Intention.vue';
import Summary from '@/components/page/Manufacturer/Summary.vue';


//订单管理
import BasicsInformation from '@/components/page/ddxd/BasicsInformation.vue'
import unfinishedOrder from '@/components/page/ddxd/unfinishedOrder.vue'
import FinisheOrder from '@/components/page/ddxd/FinisheOrder.vue'

//库存管理
import jxskcStatus from '@/components/page/kucun/jxskcStatus.vue'
import jxskcCkd from '@/components/page/kucun/jxskcCkd.vue'
import cskcl from '@/components/page/kucun/cskcl.vue'

//服务提供
import ServerType from '@/components/page/server/ServerType.vue'
import ApplyServer from '@/components/page/server/ApplyServer.vue'



Vue.use(Router);
export default new Router({
    routes: [
        {
            path: '/',
            redirect: '/login'
        },
        {
            path: '/',
            component: Home,
            meta: {title: '自述文件'},
            children: [
                {meta: {title: '系统首页'}, path: '/dashboard', component: debug403},
                //系统管理
                {meta: {title: '菜单管理'}, path: '/adscm/system/menu', component: menu},
                {meta: {title: '用户管理'}, path: '/adscm/system/user', component: user},
                {meta: {title: '角色管理'}, path: '/adscm/system/role', component: roles},
                {meta: {title: '部门管理'}, path: '/adscm/system/dept', component: company},
                {meta: {title: '日志管理'}, path: '/adscm/system/log', component: debug404},

                /*
                 * 医院管理
                 * */
                {meta: {title: "医院基础信息管理"}, path: '/adscm/dealer/jyHospitalBase', component: HospitalBasic},

                /*
                 * 经销商管理
                 * */
                {meta: {title: "经销商基础信息管理"}, path: "/adscm/dealer/4776", component: DistributorBasic},


                /*
                 * 报单管理
                 * */

                {meta: {title:'报单申请'},path :'/adscm/dealer/jyDeclarationForm/4794',component:applyList},
                {meta: {title: "报单审核"}, path: "/adscm/dealer/jyDeclarationFormAudit/4800", component: ToExamine},
                {meta: {title: '报单过程'},path :'/adscm/dealer/jyDeclarationForm/4847',component:applyProcess},
                {meta: {title: "报单意向队列"}, path: "/adscm/dealer/jyDeclarationFormAudit/4823", component: Intention},
                {meta: {title: "报单记录汇总"}, path: "/adscm/dealer/jyDeclarationFormAudit/4829", component: Summary},


                /*
                * 订单管理
                * */
                {meta:{title:'产品信息'},path :'/adscm/order/product/4749',component:BasicsInformation},
                {meta:{title:'待办订单信息'},path :'/adscm/order/ordering/4751',component:unfinishedOrder},
                {meta:{title:'已办订单信息'},path :'/adscm/order/ordered/4752',component:FinisheOrder},


                /*
                * 库存管理
                * */
                {meta:{title:'库存状态'},path :'/adscm/stock/jyInStorage/4814',component:jxskcStatus},
                {meta:{title:'出库单'},path :'/adscm/stock/jyOutStorage/4816',component:jxskcCkd},
                {meta:{title:'剩余库存'},path :'/adscm/stock/remaining/4813',component:cskcl},


                /*
                * 服务提供
                * */
                {meta:{title:'服务类型'},path:'/adscm/serviceProvider/jyServiceType',component:ServerType},
                {meta:{title:'申请服务'},path:'/adscm/serviceProvider/jyService',component:ApplyServer},






            ]
        },
        {
            path: '/login',
            component: Login
        },
        {
            path: '*',
            redirect: '/404'
        }
    ]
})
